package LeetCode.LeetCode2;

class Num532 {
    public int missingNumber(int[] nums) {
        int []num = new int[10001];
        for (int i = 0; i <= 10000; i++) {
            num[i] = i;
        }
        int i = 0;
        while(i <= nums.length - 1){
            if(nums[i] == num[i]){
                i++;
                continue;
            }else{
                return num[i];
            }
        }
        return num[i];
    }
}
